Systems and methods for coding transform coefficient level values

ABSTRACT

This disclosure relates to video coding and more particularly to techniques for performing entropy coding. According to an aspect of an invention, a parity level flag specifying a parity of a transform coefficient level at a scanning position is decoded if a value of a second absolute level greater flag is equal to a first value.

CROSS REFERENCE

This Nonprovisional application claims priority under 35 U.S.C. § 119 onprovisional Application No. 62/729,942 on Sep. 11, 2018, No. 62/732,454on Sep. 17, 2018, the entire contents of which are hereby incorporatedby reference.

TECHNICAL FIELD

This disclosure relates to video coding and more particularly totechniques for performing entropy coding.

BACKGROUND ART

Digital video capabilities can be incorporated into a wide range ofdevices, including digital televisions, laptop or desktop computers,tablet computers, digital recording devices, digital media players,video gaming devices, cellular telephones, including so-calledsmartphones, medical imaging devices, and the like. Digital video may becoded according to a video coding standard. Video coding standards mayincorporate video compression techniques. Examples of video codingstandards include ISO/IEC MPEG-4 Visual and ITU-T H.264 (also known asISO/IEC MPEG-4 AVC) and High-Efficiency Video Coding (HEVC). HEVC isdescribed in High Efficiency Video Coding (HEVC), Rec. ITU-T H.265,December 2016, which is incorporated by reference, and referred toherein as ITU-T H.265. Extensions and improvements for ITU-T H.265 arecurrently being considered for the development of next generation videocoding standards. For example, the ITU-T Video Coding Experts Group(VCEG) and ISO/IEC (Moving Picture Experts Group (MPEG) (collectivelyreferred to as the Joint Video Exploration Team (JVET)) are studying thepotential need for standardization of future video coding technologywith a compression capability that significantly exceeds that of thecurrent HEVC standard. The Joint Exploration Model 7 (JEM 7), AlgorithmDescription of Joint Exploration Test Model 7 (JEM 7), ISO/IECJTC1/SC29/WG11 Document: JVET-G1001, July 2017, Torino, IT, which isincorporated by reference herein, describes the coding features that areunder coordinated test model study by the JVET as potentially enhancingvideo coding technology beyond the capabilities of ITU-T H.265. Itshould be noted that the coding features of JEM 7 are implemented in JEMreference software. As used herein, the term JEM may collectively referto algorithms included in JEM 7 and implementations of JEM referencesoftware. Further, in response to a “Joint Call for Proposals on VideoCompression with Capabilities beyond HEVC,” jointly issued by VCEG andMPEG, multiple descriptions of video coding were proposed by variousgroups at the 10^(th) Meeting of ISO/IEC JTC1/SC29/WG11 16-20 Apr. 2018,San Diego, Calif. As a result of the multiple descriptions of videocoding, a draft text of a video coding specification is described in“Versatile Video Coding (Draft 1),” 10^(th) Meeting of ISO/IECJTC1/SC29/WG11 16-20 Apr. 2018, San Diego, Calif., documentJVET-J1001-v2, which is incorporated by reference herein, and referredto as JVET-J1001.

Video compression techniques enable data requirements for storing andtransmitting video data to be reduced. Video compression techniques mayreduce data requirements by exploiting the inherent redundancies in avideo sequence. Video compression techniques may sub-divide a videosequence into successively smaller portions (i.e., groups of frameswithin a video sequence, a frame within a group of frames, slices withina frame, coding tree units (e.g., macroblocks) within a slice, codingblocks within a coding tree unit, etc.). Intra prediction codingtechniques (e.g., intra-picture (spatial)) and inter predictiontechniques (i.e., inter-picture (temporal)) may be used to generatedifference values between a unit of video data to be coded and areference unit of video data. The difference values may be referred toas residual data. Residual data may be coded as quantized transformcoefficients. Syntax elements may relate residual data and a referencecoding unit (e.g., intra-prediction mode indices, motion vectors, andblock vectors). Residual data and syntax elements may be entropy coded.Entropy encoded residual data and syntax elements may be included in acompliant bitstream.

SUMMARY OF INVENTION

In one example, a decoder for decoding coded data, the decodercomprising: a decoding circuitry that decodes a first absolute levelgreater flag specifying whether an absolute value remainder syntax ispresent at a scanning position, wherein the decoding circuitry decodes aparity level flag specifying a parity of a transform coefficient levelat the scanning position, if a value of a second absolute level greaterflag is equal to a first value, and a value of the absolute valueremainder syntax is equal to a value obtained by dividing an arrayrepresenting an absolute values of transform coefficient levels by 2.

In one example, a method of decoding coded data, the method including:decoding a first absolute level greater flag specifying whether anabsolute value remainder syntax is present at a scanning position, anddecoding a parity level flag specifying a parity of a transformcoefficient level at the scanning position, if a value of a secondabsolute level greater flag is equal to a first value, wherein a valueof the absolute value remainder syntax is equal to a value obtained bydividing an array representing an absolute values of transformcoefficient levels by 2.

In one example, a encoder for encoding data, the encoder comprising: aencoding circuitry that encodes a first absolute level greater flagspecifying whether an absolute value remainder syntax is present at ascanning position, wherein the encoding circuitry encodes a parity levelflag specifying a parity of a transform coefficient level at thescanning position, if a value of a second absolute level greater flag isequal to a first value, and a value of the absolute value remaindersyntax is equal to a value obtained by dividing an array representing anabsolute values of transform coefficient levels by 2.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a conceptual diagram illustrating an example of a group ofpictures coded according to a quad tree binary tree partitioning inaccordance with one or more techniques of this disclosure.

FIG. 2A is a conceptual diagram illustrating examples of coding a blockof video data in accordance with one or more techniques of thisdisclosure.

FIG. 2B is a conceptual diagram illustrating examples of coding a blockof video data in accordance with one or more techniques of thisdisclosure.

FIG. 3 is a block diagram illustrating an example of a system that maybe configured to encode and decode video data according to one or moretechniques of this disclosure.

FIG. 4 is a block diagram illustrating an example of a video encoderthat may be configured to encode video data according to one or moretechniques of this disclosure.

FIG. 5 is a block diagram illustrating an example of a entropy encoderthat may be configured to encode video data according to one or moretechniques of this disclosure.

FIG. 6 is a block diagram illustrating an example of a video decoderthat may be configured to decode video data according to one or moretechniques of this disclosure.

FIG. 7 is a block diagram illustrating an example of a entropy decoderthat may be configured to encode video data according to one or moretechniques of this disclosure.

DESCRIPTION OF EMBODIMENTS

In general, this disclosure describes various techniques for codingvideo data. In particular, this disclosure describes techniques forcoding transform coefficient level values. It should be noted thatalthough techniques of this disclosure are described with respect toITU-T H.264, ITU-T H.265, and JEM, the techniques of this disclosure aregenerally applicable to video coding. For example, the coding techniquesdescribed herein may be incorporated into video coding systems,(including video coding systems based on future video coding standards)including block structures, intra prediction techniques, interprediction techniques, transform techniques, filtering techniques,and/or entropy coding techniques other than those included in ITU-TH.265 and JEM. Thus, reference to ITU-T H.264, ITU-T H.265, and/or JEMis for descriptive purposes and should not be construed to limit thescope of the techniques described herein. Further, it should be notedthat incorporation by reference of documents herein is for descriptivepurposes and should not be construed to limit or create ambiguity withrespect to terms used herein. For example, in the case where anincorporated reference provides a different definition of a term thananother incorporated reference and/or as the term is used herein, theterm should be interpreted in a manner that broadly includes eachrespective definition and/or in a manner that includes each of theparticular definitions in the alternative.

In one example, a method comprises determining whether a coefficientlevel value is equal to one, and in the case where the coefficient levelvalue is equal to one indicating that the coefficient level value isequal to one by signaling values for a first flag and a second flag, inthe case where the coefficient level value is greater than onedetermining whether the coefficient level value is greater than or equalto three, in the case where the coefficient level value is not greaterthan or equal to three, indicating that the coefficient level value isequal to two by signaling values for the first flag, the second flag,and a third flag, in the case where the coefficient level value isgreater than or equal to three, indicating a value of the coefficientlevel by signaling values for the first flag, the second flag, the thirdflag, and a fourth flag.

In one example, a device comprises one or more processors configured todetermine whether a coefficient level value is equal to one, and in thecase where the coefficient level value is equal to one indicate that thecoefficient level value is equal to one by signaling values for a firstflag and a second flag, in the case where the coefficient level value isgreater than one determine whether the coefficient level value isgreater than or equal to three, in the case where the coefficient levelvalue is not greater than or equal to three, indicate that thecoefficient level value is equal to two by signaling values for thefirst flag, the second flag, and a third flag, in the case where thecoefficient level value is greater than or equal to three, indicate avalue of the coefficient level by signaling values for the first flag,the second flag, the third flag, and a fourth flag.

In one example, a non-transitory computer-readable storage mediumcomprises instructions stored thereon that, when executed, cause one ormore processors of a device to determine whether a coefficient levelvalue is equal to one, and in the case where the coefficient level valueis equal to one indicate that the coefficient level value is equal toone by signaling values for a first flag and a second flag, in the casewhere the coefficient level value is greater than one determine whetherthe coefficient level value is greater than or equal to three, in thecase where the coefficient level value is not greater than or equal tothree, indicate that the coefficient level value is equal to two bysignaling values for the first flag, the second flag, and a third flag,in the case where the coefficient level value is greater than or equalto three, indicate a value of the coefficient level by signaling valuesfor the first flag, the second flag, the third flag, and a fourth flag.

In one example, an apparatus comprises means for determining whether acoefficient level value is equal to one, and in the case where thecoefficient level value is equal to one means for indicating that thecoefficient level value is equal to one by signaling values for a firstflag and a second flag, in the case where the coefficient level value isgreater than one means for determining whether the coefficient levelvalue is greater than or equal to three, in the case where thecoefficient level value is not greater than or equal to three, means forindicating that the coefficient level value is equal to two by signalingvalues for the first flag, the second flag, and a third flag, in thecase where the coefficient level value is greater than or equal tothree, means for indicating a value of the coefficient level bysignaling values for the first flag, the second flag, the third flag,and a fourth flag.

In one example, a method comprises parsing a first and second flagincluded in a bitstream, determining that a coefficient level value isgreater than one based on the values of the parsed first and secondflags, parsing a third and fourth flag included in the bitstream,determining whether the coefficient level value is an odd number greaterthan or equal to three or an even number greater than or equal to fourbased on the values of the parsed third and fourth flag.

In one example, a device comprises one or more processors configured toparse a first and second flag included in a bitstream, determine that acoefficient level value is greater than one based on the values of theparsed first and second flags, parse a third and fourth flag included inthe bitstream, determine whether the coefficient level value is an oddnumber greater than or equal to three or an even number greater than orequal to four based on the values of the parsed third and fourth flag.

In one example, a non-transitory computer-readable storage mediumcomprises instructions stored thereon that, when executed, cause one ormore processors of a device to parse a first and second flag included ina bitstream, determine that a coefficient level value is greater thanone based on the values of the parsed first and second flags, parse athird and fourth flag included in the bitstream, determine whether thecoefficient level value is an odd number greater than or equal to threeor an even number greater than or equal to four based on the values ofthe parsed third and fourth flag.

In one example, an apparatus comprises means for parsing a first andsecond flag included in a bitstream, means for determining that acoefficient level value is greater than one based on the values of theparsed first and second flags, means for parsing a third and fourth flagincluded in the bitstream, means for determining whether the coefficientlevel value is an odd number greater than or equal to three or an evennumber greater than or equal to four based on the values of the parsedthird and fourth flag.

The details of one or more examples are set forth in the accompanyingdrawings and the description below. Other features, objects, andadvantages will be apparent from the description and drawings, and fromthe claims.

Video content typically includes video sequences comprised of a seriesof frames (or pictures). A series of frames may also be referred to as agroup of pictures (GOP). Each video frame or picture may include aplurality of slices or tiles, where a slice or tile includes a pluralityof video blocks. As used herein, the term video block may generallyrefer to an area of a picture or may more specifically refer to thelargest array of sample values that may be predictively coded,sub-divisions thereof, and/or corresponding structures. Further, theterm current video block may refer to an area of a picture being encodedor decoded. A video block may be defined as an array of sample valuesthat may be predictively coded. It should be noted that in some casespixel values may be described as including sample values for respectivecomponents of video data, which may also be referred to as colorcomponents, (e.g., luma (Y) and chroma (Cb and Cr) components or red,green, and blue components). It should be noted that in some cases, theterms pixel value and sample value are used interchangeably. Videoblocks are ordered within a picture according to a scan pattern (e.g., araster scan). A video encoder may perform predictive encoding on videoblocks and sub-divisions thereof. Video blocks and sub-divisions thereofmay be referred to as nodes.

A video sampling format, which may also be referred to as a chromaformat, may define the number of chroma samples included in a CU withrespect to the number of luma samples included in a CU. For example, forthe 4:2:0 sampling format, the sampling rate for the luma component istwice that of the chroma components for both the horizontal and verticaldirections. As a result, for a CU formatted according to the 4:2:0format, the width and height of an array of samples for the lumacomponent are twice that of each array of samples for the chromacomponents. As described above, a CU is typically defined according tothe number of horizontal and vertical luma samples. For a CU formattedaccording to the 4:2:2 format, the width of an array of samples for theluma component is twice that of the width of an array of samples foreach chroma component, but the height of the array of samples for theluma component is equal to the height of an array of samples for eachchroma component. Further, for a CU formatted according to the 4:4:4format, an array of samples for the luma component has the same widthand height as an array of samples for each chroma component.

ITU-T H.264 specifies a macroblock including 16×16 luma samples. Thatis, in ITU-T H.264, a picture is segmented into macroblocks. ITU-T H.265specifies an analogous Coding Tree Unit (CTU) structure (which may bereferred to as a largest coding unit (LCU)). In ITU-T H.265, picturesare segmented into CTUs. In ITU-T H.265, for a picture, a CTU size maybe set as including 16×16, 32×32, or 64×64 luma samples. In ITU-T H.265,a CTU is composed of respective Coding Tree Blocks (CTB) for eachcomponent of video data (e.g., luma (Y) and chroma (Cb and Cr). Itshould be noted that video having one luma component and the twocorresponding chroma components may be described as having two channels,i.e., a luma channel and a chroma channel. Further, in ITU-T H.265, aCTU may be partitioned according to a quadtree (QT) partitioningstructure, which results in the CTBs of the CTU being partitioned intoCoding Blocks (CB). That is, in ITU-T H.265, a CTU may be partitionedinto quadtree leaf nodes. According to ITU-T H.265, one luma CB togetherwith two corresponding chroma CBs and associated syntax elements arereferred to as a coding unit (CU). In ITU-T H.265, a minimum allowedsize of a CB may be signaled. In ITU-T H.265, the smallest minimumallowed size of a luma CB is 8×8 luma samples. In ITU-T H.265, thedecision to code a picture area using intra prediction or interprediction is made at the CU level.

In ITU-T H.265, a CU is associated with a prediction unit (PU) structurehaving its root at the CU. In ITU-T H.265, PU structures allow luma andchroma CBs to be split for purposes of generating correspondingreference samples. That is, in ITU-T H.265, luma and chroma CBs may besplit into respective luma and chroma prediction blocks (PBs), where aPB includes a block of sample values for which the same prediction isapplied. In ITU-T H.265, a CB may be partitioned into 1, 2, or 4 PBs.ITU-T H.265 supports PB sizes from 64×64 samples down to 4×4 samples. InITU-T H.265, square PBs are supported for intra prediction, where a CBmay form the PB or the CB may be split into four square PBs (i.e., intraprediction PB types include M×M or M/2×M/2, where M is the height andwidth of the square CB). In ITU-T H.265, in addition to the square PBs,rectangular PBs are supported for inter prediction, where a CB may byhalved vertically or horizontally to form PBs (i.e., inter prediction PBtypes include M×M, M/2×M/2, M/2×M, or M×M/2). Further, it should benoted that in ITU-T H.265, for inter prediction, four asymmetric PBpartitions are supported, where the CB is partitioned into two PBs atone quarter of the height (at the top or the bottom) or width (at theleft or the right) of the CB (i.e., asymmetric partitions include M/4×Mleft, M/4×M right, M×M/4 top, and M×M/4 bottom). Intra prediction data(e.g., intra prediction mode syntax elements) or inter prediction data(e.g., motion data syntax elements) corresponding to a PB is used toproduce reference and/or predicted sample values for the PB.

JEM specifies a CTU having a maximum size of 256×256 luma samples. JEMspecifies a quadtree plus binary tree (QTBT) block structure. In JEM,the QTBT structure enables quadtree leaf nodes to be further partitionedby a binary tree (BT) structure. That is, in JEM, the binary treestructure enables quadtree leaf nodes to be recursively dividedvertically or horizontally. FIG. 1 illustrates an example of a CTU(e.g., a CTU having a size of 256×256 luma samples) being partitionedinto quadtree leaf nodes and quadtree leaf nodes being furtherpartitioned according to a binary tree. That is, in FIG. 1 dashed linesindicate additional binary tree partitions in a quadtree. Thus, thebinary tree structure in JEM enables square and rectangular leaf nodes,where each leaf node includes a CB. As illustrated in FIG. 1 , a pictureincluded in a GOP may include slices, where each slice includes asequence of CTUs and each CTU may be partitioned according to a QTBTstructure. FIG. 1 illustrates an example of QTBT partitioning for oneCTU included in a slice. In JEM, CBs are used for prediction without anyfurther partitioning. That is, in JEM, a CB may be a block of samplevalues on which the same prediction is applied. Thus, a JEM QTBT leafnode may be analogous a PB in ITU-T H.265.

For intra prediction coding, an intra prediction mode may specify thelocation of reference samples within a picture. In ITU-T H.265, definedpossible intra prediction modes include a planar (i.e., surface fitting)prediction mode (predMode: 0), a DC (i.e., flat overall averaging)prediction mode (predMode: 1), and 33 angular prediction modes(predMode: 2-34). In JEM, defined possible intra-prediction modesinclude a planar prediction mode (predMode: 0), a DC prediction mode(predMode: 1), and 65 angular prediction modes (predMode: 2-66). Itshould be noted that planar and DC prediction modes may be referred toas non-directional prediction modes and that angular prediction modesmay be referred to as directional prediction modes. It should be notedthat the techniques described herein may be generally applicableregardless of the number of defined possible prediction modes.

For inter prediction coding, a motion vector (MV) identifies referencesamples in a picture other than the picture of a video block to be codedand thereby exploits temporal redundancy in video. For example, acurrent video block may be predicted from reference block(s) located inpreviously coded frame(s) and a motion vector may be used to indicatethe location of the reference block. A motion vector and associated datamay describe, for example, a horizontal component of the motion vector,a vertical component of the motion vector, a resolution for the motionvector (e.g., one-quarter pixel precision, one-half pixel precision,one-pixel precision, two-pixel precision, four-pixel precision), aprediction direction and/or a reference picture index value. Further, acoding standard, such as, for example ITU-T H.265, may support motionvector prediction. Motion vector prediction enables a motion vector tobe specified using motion vectors of neighboring blocks. Examples ofmotion vector prediction include advanced motion vector prediction(AMVP), temporal motion vector prediction (TMVP), so-called “merge”mode, and “skip” and “direct” motion inference. Further, JEM supportsadvanced temporal motion vector prediction (ATMVP) and Spatial-temporalmotion vector prediction (STMVP).

As described above, intra prediction data or inter prediction data isused to produce reference sample values for a block of sample values.The difference between sample values included in a current PB, oranother type of picture area structure, and associated reference samples(e.g., those generated using a prediction) may be referred to asresidual data. Residual data may include respective arrays of differencevalues corresponding to each component of video data. Residual data maybe in the pixel domain. A transform, such as, a discrete cosinetransform (DCT), a discrete sine transform (DST), an integer transform,a wavelet transform, or a conceptually similar transform, may be appliedto an array of difference values to generate transform coefficients. Insome cases, a transform process may include rotation, and/or performanceof one or more one dimensional transforms. It should be noted that inITU-T H.265, a CU is associated with a transform unit (TU) structurehaving its root at the CU level. That is, in ITU-T H.265, an array ofdifference values may be sub-divided for purposes of generatingtransform coefficients (e.g., four 8×8 transforms may be applied to a16×16 array of residual values). For each component of video data, suchsub-divisions of difference values may be referred to as TransformBlocks (TBs). It should be noted that in ITU-T H.265, TBs are notnecessarily aligned with PBs. Further, it should be noted that in ITU-TH.265, TBs may have the following sizes 4×4, 8×8, 16×16, and 32×32.

It should be noted that in JEM, residual values corresponding to a CBare used to generate transform coefficients without furtherpartitioning. That is, in JEM a QTBT leaf node may be analogous to botha PB and a TB in ITU-T H.265. It should be noted that in JEM, a coretransform and a subsequent secondary transforms may be applied (in thevideo encoder) to generate transform coefficients. For a video decoder,the order of transforms is reversed. Further, in JEM, whether asecondary transform is applied to generate transform coefficients may bedependent on a prediction mode.

A quantization process may be performed on transform coefficients orresidual sample values directly, e.g., in the case of palette codingquantization. Quantization approximates transform coefficients byamplitudes restricted to a set of specified values. Quantizationessentially scales transform coefficients in order to vary the amount ofdata required to represent a group of transform coefficients.Quantization may include division of transform coefficients (orresulting values of addition of an offset value to transformcoefficients) by a quantization scaling factor and any associatedrounding functions (e.g., rounding to the nearest integer). Quantizedtransform coefficients may be referred to as coefficient level values.Inverse quantization (or “dequantization”) may include multiplication ofcoefficient level values by the quantization scaling factor, and anyreciprocal rounding or offset addition operations. It should be notedthat as used herein the term quantization process in some instances mayrefer to division by a scaling factor to generate level values andmultiplication by a scaling factor to recover transform coefficients insome instances. That is, a quantization process may refer toquantization in some cases and inverse quantization in some cases.Further, it should be noted that although in some of the examples belowquantization processes are described with respect to arithmeticoperations associated with decimal notation, such descriptions are forillustrative purposes and should not be construed as limiting. Forexample, the techniques described herein may be implemented in a deviceusing binary operations and the like. For example, multiplication anddivision operations described herein may be implemented using bitshifting operations and the like.

With respect to the equations used herein, the following arithmeticoperators may be used:

-   -   + Addition    -   − Subtraction    -   * Multiplication, including matrix multiplication    -   x^(y) Exponentiation. Specifies x to the power of y. In other        contexts, such notation is used for superscripting not intended        for interpretation as exponentiation.    -   / Integer division with truncation of the result toward zero.        For example, 7/4 and −7/−4 are truncated to 1 and −7/4 and 7/−4        are truncated to −1.    -   ÷ Used to denote division in mathematical equations where no        truncation or rounding is intended.

$\frac{x}{y}$

-   -   Used to denote division in mathematical equations where no        truncation or rounding is intended.    -   x % y Modulus. Remainder of x divided by y, defined only for        integers x and y with x>=0 and y>0.

Further, the following logical operators may be used:

-   -   x&&y Boolean logical “and” of x and y    -   x∥y Boolean logical “or” of x and y    -   ! Boolean logical “not”    -   x?y:z If x is TRUE or not equal to 0, evaluates to the value of        y; otherwise, evaluates to the value of z.

Further, the following relational operators may be used:

-   -   > Greater than    -   >= Greater than or equal to    -   < Less than    -   <= Less than or equal to    -   == Equal to    -   != Not equal to

Further, the following bit-wise operators may be used:

-   -   & Bit-wise “and”. When operating on integer arguments, operates        on a two's complement representation of the integer value. When        operating on a binary argument that contains fewer bits than        another argument, the shorter argument is extended by adding        more significant bits equal to 0.    -   | Bit-wise “or”. When operating on integer arguments, operates        on a two's complement representation of the integer value. When        operating on a binary argument that contains fewer bits than        another argument, the shorter argument is extended by adding        more significant bits equal to 0.    -   {circumflex over ( )} A Bit-wise “exclusive or”. When operating        on integer arguments, operates on a two's complement        representation of the integer value. When operating on a binary        argument that contains fewer bits than another argument, the        shorter argument is extended by adding more significant bits        equal to 0.    -   x>>y Arithmetic right shift of a two's complement integer        representation of x by y binary digits. This function is defined        only for non-negative integer values of y. Bits shifted into the        most significant bits (MSBs) as a result of the right shift have        a value equal to the MSB of x prior to the shift operation.    -   x<<y Arithmetic left shift of a two's complement integer        representation of x by y binary digits. This function is defined        only for non-negative integer values of y. Bits shifted into the        least significant bits (LSBs) as a result of the left shift have        a value equal to 0.

FIGS. 2A-2B are conceptual diagrams illustrating examples of coding ablock of video data. As illustrated in FIG. 2A, a current block of videodata (e.g., a CB corresponding to a video component) is encoded bygenerating a residual by subtracting a set of prediction values from thecurrent block of video data, performing a transformation on theresidual, and quantizing the transform coefficients to generate levelvalues. As illustrated in FIG. 2B, the current block of video data isdecoded by performing inverse quantization on level values, performingan inverse transform, and adding a set of prediction values to theresulting residual. It should be noted that in the examples in FIGS.2A-2B, the sample values of the reconstructed block differs from thesample values of the current video block that is encoded. In thismanner, coding may said to be lossy. However, the difference in samplevalues may be considered acceptable or imperceptible to a viewer of thereconstructed video.

Further, as illustrated in FIGS. 2A-2B, coefficient level values aregenerated using an array of scaling factors. In ITU-T H.265, an array ofscaling factors is generated by selecting a scaling matrix andmultiplying each entry in the scaling matrix by a quantization scalingfactor. In ITU-T H.265, a scaling matrix is selected based in part on aprediction mode and a color component, where scaling matrices of thefollowing sizes are defined: 4×4, 8×8, 16×16, and 32×32. It should benoted that in some examples, a scaling matrix may provide the same valuefor each entry (i.e., all coefficients are scaled according to a singlevalue). In ITU-T H.265, the value of a quantization scaling factor, maybe determined by a quantization parameter, QP. In ITU-T H.265, for abit-depth of 8-bits, the QP can take 52 values from 0 to 51 and a changeof 1 for QP generally corresponds to a change in the value of thequantization scaling factor by approximately 12%. Further, in ITU-TH.265, a QP value for a set of transform coefficients may be derivedusing a predictive quantization parameter value (which may be referredto as a predictive QP value or a QP predictive value) and an optionallysignaled quantization parameter delta value (which may be referred to asa QP delta value or a delta QP value). In ITU-T H.265, a quantizationparameter may be updated for each CU and a respective quantizationparameter may be derived for each of the luma and chroma channels.

Referring again to FIG. 2A, coefficient level values are coded into abitstream. Coefficient level values and syntax elements (e.g., syntaxelements indicating a coding structure for a video block) may be entropycoded according to an entropy coding technique. An entropy codingprocess includes coding values of syntax elements using lossless datacompression algorithms. Examples of entropy coding techniques includecontent adaptive variable length coding (CAVLC), context adaptive binaryarithmetic coding (CABAC), probability interval partitioning entropycoding (PIPE), and the like. Entropy encoded quantized transformcoefficients and corresponding entropy encoded syntax elements may forma compliant bitstream that can be used to reproduce video data at avideo decoder. An entropy coding process, for example, CABAC, mayinclude performing a binarization on syntax elements. Binarizationrefers to the process of converting a value of a syntax element into aseries of one or more bits. These bits may be referred to as “bins.”Binarization may include one or a combination of the following codingtechniques: fixed length coding, unary coding, truncated unary coding,truncated Rice coding, Golomb coding, k-th order exponential Golombcoding, and Golomb-Rice coding. For example, binarization may includerepresenting the integer value of 5 for a syntax element as 00000101using an 8-bit fixed length binarization technique or representing theinteger value of 5 as 11110 using a unary coding binarization technique.As used herein each of the terms fixed length coding, unary coding,truncated unary coding, truncated Rice coding, Golomb coding, k-th orderexponential Golomb coding, and Golomb-Rice coding may refer to generalimplementations of these techniques and/or more specific implementationsof these coding techniques. For example, a Golomb-Rice codingimplementation may be specifically defined according to a video codingstandard, for example, ITU-T H.265.

In the example of CABAC in ITU-T H.265, for a particular bin, a contextmodel is used to determine a context index for the bin. A context modelis essential a probability state model for a bin and a context indexprovides a most probable state (MPS) value for the bin (i.e., an MPS fora bin is one of 0 or 1) and a probability value of the bin being the MPSand/or least probable state (LPS) at a given state of arithmetic coding.For example, a context index may indicate, at a current state, that theMPS of a bin is 0 and the probability of the bin being 1 (i.e., the LPS)is 0.3. It should be noted that a context model may be selected based onvalues of previously coded syntax elements. For example, values ofsyntax elements associated with neighboring video blocks may be used todetermine a context model associated with a syntax element correspondingto a current video block.

Binary arithmetic coding codes a series of 0's and 1's based on theprinciple of recursive interval subdivision. Essentially, for a binarystring (b₁, . . . , b_(N)), for an interval having an initial width(range) R₀, for (b₁, . . . , b_(N)), R₀ is recursively divided asfollows:

For i = (1,...,N),  if b_(i) equals LPS:   R_(i) = pLPS_(i)*R_(i−1),otherwise   R_(i) = R_(i−1) − pLPS_(i)*R_(i−1),

-   -   Where,    -   LPS is the value of the least probably symbol, and    -   pLPS_(i) is the estimated probability of b_(i) being the LPS.

As illustrated above, R, is determined based on whether the observedvalue of b_(i) is the MPS or LPS. For example, for b₁ if R₀ is 512, theLPS is 0, and pLPS_(I)*R₀ is 158, if b₁ is observed to be 1, R₁=354 andif b₁ is observed to be 0, R₁=158. In ITU-T H.265, a context indexprovides an MPS value for a bin and a probability value of the bin beingthe LPS, where the probability value of the bin being the LPS (i.e.,pLPS) is indicated by one of 64 probability states. In particular, inITU-T H.265, a probability state index variable, pStateIdx, is indexedsuch that, pStateIdx=0 corresponds to a maximum LPS probability value,and decreasing LPS probabilities are indexed to higher values ofpStateIdx. Further, in ITU-T H.265, R₀ is 512 which can be representedby 9-bits. However, R_(i) is quantized to a set {Q1, . . . , Q4} suchthat all possible values of pLPS_(i)*R_(i−1) are pre-computed andindexed according to a 64×4 look-up table.

During encoding, after an interval for R_(i) is determined, i.e., basedon pLPS_(i) and the observed value of b_(i), a renormalization processoccurs. A renormalization process essentially determines whether bitsare output (e.g., written to a bitstream) based on the value of R_(i).Essentially, in renormalization, if R_(i) falls below a threshold value,and R_(i) is doubled and a bit value may be output. For example, inencoder side renormalization process described in ITU-T H.265, adetermination is made if R_(i) is less than 256. If R_(i) is not lessthan 256, no bits are written to the bitstream and R_(i+1) is computedfor b_(i+1), using R_(i). If R_(i) is less than 256, a 0-bit, a 1-bit,or no bit is conditionally written to the bitstream based on the lowerend of the sub-interval, and R_(i) is doubled, and R_(i+1) is computedfor b_(i+1) (i.e., based on the doubled value of R_(i)). A binarydecoder receiving the output bits (i.e., the arithmetic code) recoversthe binary string (b₁, . . . , b_(N)) by performing the same intervalsub-division at each b_(i) as an encoder and by comparing subsets of thearithmetic code to R_(i) values.

In ITU-T H.265, the observed value of a bin is used to update thecontext index. ITU-T H.265 provides the following with respect toupdating the context index based on the determined value of the bin:

if( binVal = = valMps )  pStateIdx = transIdxMps( pStateIdx ) else { if( pStateIdx = = 0 )   valMps = 1 − valMps  pStateIdx = transIdxLps(pStateIdx ) }

-   -   Where,    -   valMps is the value of the MPS for the bin; and    -   transIdxMps 0 and transIdxLps0 are a defined set of transition        rules as provided in Table 1.

TABLE 1 pStateIdx 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 transIdxLps 0 01 2 2 4 4 5 6  7  8  9  9 11 11 12 transIdxMps 1 2 3 4 5 6 7 8 9 10 1112 13 14 15 16 pStateIdx 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31transIdxLps 13 13 15 15 16 16 18 18 19 19 21 21 22 22 23 24 transIdxMps17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 pStateIdx 32 33 34 35 3637 38 39 40 41 42 43 44 45 46 47 transIdxLps 24 25 26 26 27 27 28 29 2930 30 30 31 32 32 33 transIdxMps 33 34 35 36 37 38 39 40 41 42 43 44 4546 47 48 pStateIdx 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63transIdxLps 33 33 34 34 35 35 35 36 36 36 37 37 37 38 38 63 transIdxMps49 50 51 52 53 54 55 56 57 58 59 60 61 62 62 63

Thus, in ITU-T H.265, if the bin value is determined to be equal to theMPS, the LPS probability value is decreased. If the bin value isdetermined to be equal to the LPS, the LPS probability value isincreased and further, if the current probability state pLPS is 0.5(i.e., pStateIdx equals 0), a LPS inversion occurs (i.e., the previousLPS value becomes the MPS). It should be noted, that according to ITU-TH.265, some syntax elements are entropy coded using arithmetic codingaccording to equal probability states, such coding may be referred to asbypass coding. The probability estimation provided in ITU-T H.265 has arelatively low complexity. Improved probability estimations (i.e., moreaccurate) with higher complexity have been proposed for use in binaryarithmetic coding.

As described above, coefficient level values are coded into a bitstream.In ITU-T H.265, a coefficient level value is indicated according to thesyntax illustrated in Table 2.

TABLE 2 residual_coding( x0, y0, log2TrafoSize, cIdx ) { ...   xS =ScanOrder[ log2TrafoSize − 2 ][ scanIdx ][ lastSubBlock ][ 0 ]   yS =ScanOrder[ log2TrafoSize − 2 ][ scanIdx ][ lastSubBlock ][ 1 ]   xC = (xS << 2 ) + ScanOrder[ 2 ][ scanIdx ][ lastScanPos ][ 0 ]   yC = ( yS <<2 ) + ScanOrder[ 2 ][ scanIdx ][ lastScanPos ][ 1 ]  } while( ( xC !=LastSignificantCoeffX ) | | ( yC !=  LastSignificantCoeffY ) )  for( i =lastSubBlock; i >= 0; i− − ) {   xS = ScanOrder[ log2TrafoSize − 2 ][scanIdx ][ i ][ 0 ]   yS = ScanOrder[ log2TrafoSize − 2 ][ scanIdx ][ i][ 1 ]   inferSbDcSigCoeffFlag = 0   if( ( i < lastSubBlock ) && ( i > 0) ) {    coded_sub_block_flag[ xS ][ yS ]    inferSbDcSigCoeffFlag = 1  }   for( n = ( i = = lastSubBlock ) ? lastScanPos − 1 : 15; n >= 0; n−−   ) {    xC = ( xS << 2 ) + ScanOrder[ 2 ][ scanIdx ][ n ][ 0 ]    yC= ( yS << 2 ) + ScanOrder[ 2 ][ scanIdx ][ n ][ 1 ]    if(coded_sub_block_flag[ xS ][ yS ] && ( n > 0 | |   !inferSbDcSigCoeffFlag ) ) {     sig_coeff_flag[ xC ][ yC ]     if(sig_coeff_flag[ xC ][ yC ] )      inferSbDcSigCoeffFlag = 0    }   }  firstSigScanPos = 16   lastSigScanPos = −1   numGreater1Flag = 0  lastGreater1ScanPos = −1   for( n = 15; n >= 0; n− − ) {    xC = ( xS<< 2 ) + ScanOrder[ 2 ][ scanIdx ][ n ][ 0 ]    yC = ( yS << 2 ) +ScanOrder[ 2 ][ scanIdx ][ n ][ 1 ]    if( sig_coeff_flag[ xC ][ yC ] ){     if( numGreater1Flag < 8 ) {      coeff_abs_level_greater1_flag[ n]      numGreater1Flag++      if( coeff_abs_level_greater1_flag[ n ] &&     lastGreater1ScanPos = = −1 )       lastGreater1ScanPos = n     else if( coeff_abs_level_greater1_flag[ n ] )      escapeDataPresent = 1     } else      escapeDataPresent = 1    if( lastSigScanPos = = −1 )      lastSigScanPos = n    firstSigScanPos = n    }   } ...   if( lastGreater1ScanPos != −1 ) {   coeff_abs_level_greater2_flag[ lastGreater1ScanPos ]    if(coeff_abs_level_greater2_flag[ lastGreater1ScanPos ] )    escapeDataPresent = 1   }   for( n = 15; n >= 0; n− − ) {    xC = (xS << 2 ) + ScanOrder[ 2 ][ scanIdx ][ n ][ 0 ]    yC = ( yS << 2 ) +ScanOrder[ 2 ][ scanIdx ][ n ][ 1 ]    if( sig_coeff_flag[ xC ][ yC ] &&    ( !sign_data_hiding_enabled_flag | | !signHidden | | ( n !=firstSigScanPos ) ) )     coeff_sign_flag[ n ]   }   numSigCoeff = 0  sumAbsLevel = 0   for( n = 15; n >= 0; n− − ) {    xC = ( xS << 2 ) +ScanOrder[ 2 ][ scanIdx ][ n ][ 0 ]    yC = ( yS << 2 ) + ScanOrder[ 2][ scanIdx ][ n ][ 1 ]    if( sig_coeff_flag[ xC ][ yC ] ) {    baseLevel = 1 + coeff_abs_level_greater1_flag[ n ] +       coeff_abs_level_greater2_flag[ n ]     if( baseLevel = = ( (numSigCoeff < 8 ) ?         ( (n = = lastGreater1ScanPos) ? 3 : 2 ) : 1) )      coeff_abs_level_remaining[ n ]     TransCoeffLevel[ x0 ][ y0 ][cIdx ][ xC ][ yC ] =      ( coeff_abs_level_remaining[ n ] + baseLevel) * ( 1 − 2 *      coeff_sign_flag[ n ] ) ... }

With respect to Table 2, ITU-T H.265, provides the following semantics:

coded_sub_block_flag[xS][yS] specifies the following for the sub-blockat location (xS, yS) within the current transform block, where asub-block is a (4×4) array of 16 transform coefficient levels:

-   -   If coded_sub_block_flag[xS][yS] is equal to 0, the 16 transform        coefficient levels of the sub-block at location (xS, yS) are        inferred to be equal to 0.    -   Otherwise (coded_sub_block_flag[xS][yS] is equal to 1), the        following applies:        -   If (xS, yS) is equal to (0, 0) and (LastSignificantCoeffX,            LastSignificantCoeffY) is not equal to (0, 0), at least one            of the 16 sig_coeff_flag syntax elements is present for the            sub-block at location (xS, yS).        -   Otherwise, at least one of the 16 transform coefficient            levels of the sub-block at location (xS, yS) has a non zero            value.

When coded_sub_block_flag[xS ][yS ] is not present, it is inferred asfollows:

-   -   If one or more of the following conditions are true,        coded_sub_block_flag[xS][yS] is inferred to be equal to 1:        -   (xS, yS) is equal to (0, 0)        -   (xS, yS) is equal to (LastSignificantCoeffX>>2,            LastSignificantCoeffY>>2)    -   Otherwise, coded_sub_block_flag[xS ][yS] is inferred to be equal        to 0.

sig_coeff_flag[xC][yC] specifies for the transform coefficient location(xC, yC) within the current transform block whether the correspondingtransform coefficient level at the location (xC, yC) is non-zero asfollows:

-   -   If sig_coeff_flag[xC][yC] is equal to 0, the transform        coefficient level at the location (xC, yC) is set equal to 0.    -   Otherwise (sig_coeff_flag[xC][yC] is equal to 1), the transform        coefficient level at the location (xC, yC) has a non-zero value.        -   When sig_coeff_flag[xC][yC] is not present, it is inferred            as follows:    -   If (xC, yC) is the last significant location        (LastSignificantCoeffX, LastSignificantCoeffY) in scan order or        all of the following conditions are true, sig_coeff_flag[xC][yC]        is inferred to be equal to 1:        -   (xC&3, yC&3) is equal to (0, 0)        -   inferSbDcSigCoeffFlag is equal to 1        -   coded_sub_block_flag[xS][yS] is equal to 1    -   Otherwise, sig_coeff_flag[xC][yC] is inferred to be equal to 0.

coeff_abs_level_greater1_flag[n] specifies for the scanning position nwhether there are absolute values of transform coefficient levelsgreater than 1.

When coeff abs_level_greater1_flag[n] is not present, it is inferred tobe equal to 0.

coeff_abs_level_greater2_flag[n] specifies for the scanning position nwhether there are absolute values of transform coefficient levelsgreater than 2.

When coeff abs_level_greater2_flag[n] is not present, it is inferred tobe equal to 0.

coeff_sign_flag[n] specifies the sign of a transform coefficient levelfor the scanning position n as follows:

-   -   If coeff_sign_flag[n] is equal to 0, the corresponding transform        coefficient level has a positive value.    -   Otherwise (coeff_sign_flag[n] is equal to 1), the corresponding        transform coefficient level has a negative value.

When coeff_sign_flag[n] is not present, it is inferred to be equal to 0.

coeff_abs_level_remaining[n] is the remaining absolute value of atransform coefficient level that is coded with Golomb-Rice code at thescanning position n.

When coeff abs_level_remaining[n] is not present, it is inferred to beequal to 0.

Table 3 provides a summary of possible level values of a coefficient ina sub-block having significant coefficients according to values ofsig_coeff_flag, coeff_abs_level_greater1_flag,coeff_abs_level_greater2_flag, and coeff_abs_level_remaining in ITU-TH.265.

TABLE 3 sig_coeff_flag coeff_abs_level_greater1_flagcoeff_abs_level_greater2_flag coeff_abs_level_remaining CoefficientLevel Value 0 Not Signaled Not Signaled Not Signaled 0 1 0 Not SignaledNot Signaled (1 − 2 * coeff_sign_flag) 1 1 0 Not Signaled 2*(1 − 2 *coeff_sign_flag) 1 1 1 Signaled (coeff_abs_level_remaining + 3]) * (1 −2 * coeff_sign_flag[n])

It should be noted that each of coded_sub_block_flag, sig_coeff_flag,coeff_abs_level_greater1_flag, coeff_abs_level_greater2_flag, andcoeff_sign_flag have a 1-bit fixed length binarization and ITU-T H.265provides a specific binarization for coeff_abs_level_remaining. Further,ITU-T H.265 provides where coeff_sign_flag and coeff_abs_level_remainingare bypass coded and where one of four contexts is derived forcoded_sub_block_flag, one of 44 contexts is derived for sig_coeff_flag,one of 24 contexts is derived for coeff_abs_level_greater1_flag, and oneof six contexts is selected for coeff_abs_level_greater2_flag. For thesake of brevity, details of the specific binarization forcoeff_abs_level_remaining and the derivation of contexts forcoded_sub_block_flag, sig_coeff_flag, coeff_abs_level_greater1_flag, andcoeff_abs_level_greater2_flag. However, reference in made to therelevant sections in ITU-T H.265.

“Non-CE7: Alternative Entropy Coding for Dependent Quantization,” 11thMeeting of ISO/IEC JTC1/SC29/WG11 10-18 Jul. 2018, Ljubljana, SI,document JVET-K0072-v2, which is incorporated by reference herein, andreferred to as JVET-K0072, describes an implementation of codingcoefficient level values. In JVET-K0072, the transform coefficientlevels of a sub-block are coded in the following four passes over thescan positions:

-   -   pass 1: coding of significance (sig_coeff_flag), parity        (par_level_flag), and greater 1 flag (rem_abs_gt1_flag) in        coding order. The parity and greater 1 flags are only present if        sig_coeff_flag is equal to 1. The context for the greater 1 flag        does not depend on the directly preceding parity flag, and the        context of the sig_coeff_flag does not dependent on the value of        the directly preceding rem_abs_gt1_flag (when the previous        sig_coeff_flag is equal to 1);    -   pass 2: coding of greater 2 flags (rem_abs_gt2_flag) for all        scan positions with rem_abs_gt1_flag equal to 1. The context        models do not depend on any data coded in this 2^(nd) pass.    -   pass 3: coding of the syntax element abs_remainder for all scan        positions with rem_abs_gt2_flag equal to 1. The non-binary        syntax element is binarized and the resulting bins are coded in        the bypass mode of the arithmetic coding engine;    -   pass 4: coding of the signs (sign_flag) for all scan positions        with sig_coeff_flag equal to 1.

In JVET-K0072, a coefficient level value is indicated according to thesyntax illustrated in Table 4.

TABLE 4 residual_coding( x0, y0, log2TrafoSizeX, log2TrafoSizeY, cIdx,stateTransTable ) { ... xS = ScanOrder[ log2TrafoSizeX − log2SbSize ][log2TrafoSizeY − log2SbSize ] [ scanIdx ][ lastSubBlock ][ 0 ] yS =ScanOrder[ log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY − log2SbSize ][ scanIdx ][ lastSubBlock ][ 1 ] xC = ( xS << log2SbSize ) + ScanOrder[log2SbSize ][ log2SbSize ][ scanIdx ][ lastScanPos ][ 0 ] yC = ( yS <<log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize ][ scanIdx ][lastScanPos ][ 1 ]  } while( ( xC != LastSignificantCoeffX ) | | ( yC != LastSignificantCoeffY ) )  state = 0  for( i = lastSubBlock; i >= 0; i−− ) {   xS = ScanOrder[ log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY −  log2SbSize ]       [ scanIdx ][ lastSubBlock ][ 0 ]   yS = ScanOrder[log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY −   log2SbSize ]       [scanIdx ][ lastSubBlock ][ 1 ]   inferSbDcSigCoeffFlag = 0   if( ( i <lastSubBlock ) && ( i > 0 ) ) {    coded_sub_block_flag[ xS ][ yS ]   inferSbDcSigCoeffFlag = 1   }   //===== first pass: sig, par, gt1=====   for( n = ( i = = lastSubBlock ) ? lastScanPos − 1 : numSbCoeff −1; n >= 0; n− − ) {    xC = ( xS << log2SbSize ) +       ScanOrder[log2SbSize ][ log2SbSize ][ scanIdx ][ n ][ 0 ]    yC = ( yS <<log2SbSize ) +       ScanOrder[ log2SbSize ][ log2SbSize ][ scanIdx ][ n][ 1 ]    if( coded_sub_block_flag[ xS ][ yS ] && ( n > 0 | |   !inferSbDcSigCoeffFlag ) )       {     sig_coeff_flag[ xC ][ yC ]   }    absLevel[ xC ][ yC ] = 0    if( sig_coeff_flag[ xC ][ yC ] ) {     par_level_flag[ xC ][ yC ]      rem_abs_gt1_flag[ xC ][ yC ]absLevel[ xC ][ yC ] = 1 + par_level_flag[ xC ][ yC ] + 2*rem_abs_gt1_flag[ xC ][ yC ]    }    absLevel1[ xC ][ yC ] = absLevel[xC ][ yC ]    state = ( stateTransTable >> ( ( state << 2 ) + (par_level_flag[    xC ][ yC ] << 1 ) ) ) & 3   }   //===== second pass:gt2 =====   for( n = numSbCoeff − 1; n >= 0; n− − ) {    xC = ( xS <<log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][0 ]    yC = ( yS << log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize][ scanIdx ][ n ][ 1 ]    if( rem_abs_gt1_flag[ xC ][ yC ] ) {    rem_abs_gt2_flag[ xC ][ yC ]     absLevel[ xC ][ yC ] = absLevel[ xC][ yC ] + 2 *     rem_gt2_flag[ xC ][ yC ]    }   }   //===== thirdpass: bypass bins of remainder =====   for( n = numSbCoeff − 1; n >= 0;n− − ) {    xC = ( xS << log2SbSize ) + ScanOrder[ log2SbSize ][log2SbSize ][ scanIdx ][ n ][ 0 ]    yC = ( yS << log2SbSize ) +ScanOrder[ log2SbSize ][ log2SbSize ][ scanIdx ][ n ][ 1 ]    if(rem_abs_gt2_flag[ xC ][ yC ] ) {     abs_remainder[ xC ][ yC ]    absLevel[ xC ][ yC ] = absLevel[ xC ][ yC ] + 2 *     abs_remainder[xC ][ yC ]    }   }   //===== fourth pass: signs =====   for( n =numSbCoeff − 1; n >= 0; n− − ) {    xC = ( xS << log2SbSize ) +ScanOrder[ log2SbSize ][ log2SbSize ][ scanIdx ][ n ][ 0 ]    yC = ( yS<< log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize ][ scanIdx ][ n ][1 ]    if( sig_coeff_flag[ xC ][ yC ] ) {     coeff_sign_flag[ xC ][ yC]     TransCoeffLevel[ x0 ][ y0 ][ cIdx ][ xC ][ yC ] =        absLevel[xC ][ yC ] * ( 1 − 2 * coeff_sign_flag[ xC        ][ yC ] )    }   }  }}

With respect to Table 4, JVET⁻K0072, provides the following semanticsfor par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag:

par_level_flag[n] specifies the parity of the transform coefficientlevel at scanning position n. When par_level_flag[n] is not present, itis inferred to be equal to 0.

rem_abs_gt1_flag[n] specifies whether the syntax elementrem_abs_gt1_flag[n] is present for the scanning position n. Whenrem_abs_gt1_flag[n] is not present, it is inferred to be equal to 0.

rem_abs_gt2_flag[n] specifies whether the syntax elementabs_remainder[n] is present for the scanning position n. Whenrem_abs_gt2_flag[n] is not present, it is inferred to be equal to 0.

It should be noted that JVET-K0072 provides where par_level_flag,rem_abs_gt1_flag, and rem_abs_gt2_flag are assigned a context forentorpy coding.

Table 5 provides a summary of possible level values of a coefficient ina sub-block having significant coefficients according to values ofsig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, andabs_remainder in JVET-K0072.

TABLE 5 sig_coeff_flag par_level_flag rem_abs_gt1_flag rem_abs_gt2_flagabs_remainder Coefficient Level Value 0 Not Signaled Not Signaled NotSignaled Not Signaled 0 1 0 0 Not Signaled Not Signaled (1 − 2 *coeff_sign_flag) 1 1 0 Not Signaled Not Signaled 2*(1 − 2 *coeff_sign_flag) 1 0 1 0 Not Signaled 3*(1 − 2 * coeff_sign_flag) 1 1 10 Not Signaled 4*(1 − 2 * coeff_sign_flag) 1 0 1 1 Signaled (3 + 2 +2*abs_remainder) *(1 − 2 * coeff_sign_flag) 1 1 1 1 Signaled (4 + 2 +2*abs_remainder) *(1 − 2 * coeff_sign_flag)

-   -   It should be noted that in ITU-T H.265, in order to limit        decoding complexity, one or more 16-bit cabac_zero_word syntax        elements having a value of 0x0000 are appended to a network        abstraction layer (NAL) unit if a bin-to-bit ratio becomes too        high. That is, in ITU-T H.265, there is a constraint on the        maximum number of bins that may be coded at a particular        bit-rate.

FIG. 3 is a block diagram illustrating an example of a system that maybe configured to code (i.e., encode and/or decode) video data accordingto one or more techniques of this disclosure. System 100 represents anexample of a system that may perform video coding using partitioningtechniques described according to one or more techniques of thisdisclosure. As illustrated in FIG. 3 , system 100 includes source device102, communications medium 110, and destination device 120. In theexample illustrated in FIG. 3 , source device 102 may include any deviceconfigured to encode video data and transmit encoded video data tocommunications medium 110. Destination device 120 may include any deviceconfigured to receive encoded video data via communications medium 110and to decode encoded video data. Source device 102 and/or destinationdevice 120 may include computing devices equipped for wired and/orwireless communications and may include set top boxes, digital videorecorders, televisions, desktop, laptop, or tablet computers, gamingconsoles, mobile devices, including, for example, “smart” phones,cellular telephones, personal gaming devices, and medical imaginingdevices.

Communications medium 110 may include any combination of wireless andwired communication media, and/or storage devices. Communications medium110 may include coaxial cables, fiber optic cables, twisted pair cables,wireless transmitters and receivers, routers, switches, repeaters, basestations, or any other equipment that may be useful to facilitatecommunications between various devices and sites. Communications medium110 may include one or more networks. For example, communications medium110 may include a network configured to enable access to the World WideWeb, for example, the Internet. A network may operate according to acombination of one or more telecommunication protocols.Telecommunications protocols may include proprietary aspects and/or mayinclude standardized telecommunication protocols. Examples ofstandardized telecommunications protocols include Digital VideoBroadcasting (DVB) standards, Advanced Television Systems Committee(ATSC) standards, Integrated Services Digital Broadcasting (ISDB)standards, Data Over Cable Service Interface Specification (DOCSIS)standards, Global System Mobile Communications (GSM) standards, codedivision multiple access (CDMA) standards, 3rd Generation PartnershipProject (3GPP) standards, European Telecommunications StandardsInstitute (ETSI) standards, Internet Protocol (IP) standards, WirelessApplication Protocol (WAP) standards, and Institute of Electrical andElectronics Engineers (IEEE) standards.

Storage devices may include any type of device or storage medium capableof storing data. A storage medium may include a tangible ornon-transitory computer-readable media. A computer readable medium mayinclude optical discs, flash memory, magnetic memory, or any othersuitable digital storage media. In some examples, a memory device orportions thereof may be described as non-volatile memory and in otherexamples portions of memory devices may be described as volatile memory.Examples of volatile memories may include random access memories (RAM),dynamic random access memories (DRAM), and static random access memories(SRAM). Examples of non-volatile memories may include magnetic harddiscs, optical discs, floppy discs, flash memories, or forms ofelectrically programmable memories (EPROM) or electrically erasable andprogrammable (EEPROM) memories. Storage device(s) may include memorycards (e.g., a Secure Digital (SD) memory card), internal/external harddisk drives, and/or internal/external solid state drives. Data may bestored on a storage device according to a defined file format.

Referring again to FIG. 3 , source device 102 includes video source 104,video encoder 106, and interface 108. Video source 104 may include anydevice configured to capture and/or store video data. For example, videosource 104 may include a video camera and a storage device operablycoupled thereto. Video encoder 106 may include any device configured toreceive video data and generate a compliant bitstream representing thevideo data. A compliant bitstream may refer to a bitstream that a videodecoder can receive and reproduce video data therefrom. Aspects of acompliant bitstream may be defined according to a video coding standard.When generating a compliant bitstream video encoder 106 may compressvideo data. Compression may be lossy (discernible or indiscernible) orlossless. Interface 108 may include any device configured to receive acompliant video bitstream and transmit and/or store the compliant videobitstream to a communications medium. Interface 108 may include anetwork interface card, such as an Ethernet card, and may include anoptical transceiver, a radio frequency transceiver, or any other type ofdevice that can send and/or receive information. Further, interface 108may include a computer system interface that may enable a compliantvideo bitstream to be stored on a storage device. For example, interface108 may include a chipset supporting Peripheral Component Interconnect(PCI) and Peripheral Component Interconnect Express (PCIe) busprotocols, proprietary bus protocols, Universal Serial Bus (USB)protocols, I²C, or any other logical and physical structure that may beused to interconnect peer devices.

Referring again to FIG. 3 , destination device 120 includes interface122, video decoder 124, and display 126. Interface 122 may include anydevice configured to receive a compliant video bitstream from acommunications medium. Interface 108 may include a network interfacecard, such as an Ethernet card, and may include an optical transceiver,a radio frequency transceiver, or any other type of device that canreceive and/or send information. Further, interface 122 may include acomputer system interface enabling a compliant video bitstream to beretrieved from a storage device. For example, interface 122 may includea chipset supporting PCI and PCIe bus protocols, proprietary busprotocols, USB protocols, I²C, or any other logical and physicalstructure that may be used to interconnect peer devices. Video decoder124 may include any device configured to receive a compliant bitstreamand/or acceptable variations thereof and reproduce video data therefrom.Display 126 may include any device configured to display video data.Display 126 may comprise one of a variety of display devices such as aliquid crystal display (LCD), a plasma display, an organic lightemitting diode (OLED) display, or another type of display. Display 126may include a High Definition display or an Ultra High Definitiondisplay. It should be noted that although in the example illustrated inFIG. 3 , video decoder 124 is described as outputting data to display126, video decoder 124 may be configured to output video data to varioustypes of devices and/or sub-components thereof. For example, videodecoder 124 may be configured to output video data to any communicationmedium, as described herein.

FIG. 4 is a block diagram illustrating an example of video encoder 200that may implement the techniques for encoding video data describedherein. It should be noted that although example video encoder 200 isillustrated as having distinct functional blocks, such an illustrationis for descriptive purposes and does not limit video encoder 200 and/orsub-components thereof to a particular hardware or softwarearchitecture. Functions of video encoder 200 may be realized using anycombination of hardware, firmware, and/or software implementations. Inone example, video encoder 200 may be configured to encode video dataaccording to the techniques described herein. Video encoder 200 mayperform intra prediction coding and inter prediction coding of pictureareas, and, as such, may be referred to as a hybrid video encoder. Inthe example illustrated in FIG. 4 , video encoder 200 receives sourcevideo blocks. In some examples, source video blocks may include areas ofpicture that has been divided according to a coding structure. Forexample, source video data may include macroblocks, CTUs, CBs,sub-divisions thereof, and/or another equivalent coding unit. In someexamples, video encoder 200 may be configured to perform additionalsub-divisions of source video blocks. It should be noted that sometechniques described herein may be generally applicable to video coding,regardless of how source video data is partitioned prior to and/orduring encoding. In the example illustrated in FIG. 4 , video encoder200 includes summer 202, transform coefficient generator 204,coefficient quantization unit 206, inverse quantization/transformprocessing unit 208, summer 210, intra prediction processing unit 212,inter prediction processing unit 214, filter unit 216, and entropyencoding unit 218.

As illustrated in FIG. 4 , video encoder 200 receives source videoblocks and outputs a bitstream. Video encoder 200 may generate residualdata by subtracting a predictive video block from a source video block.Summer 202 represents a component configured to perform this subtractionoperation. In one example, the subtraction of video blocks occurs in thepixel domain. Transform coefficient generator 204 applies a transform,such as a discrete cosine transform (DCT), a discrete sine transform(DST), or a conceptually similar transform, to the residual block orsub-divisions thereof (e.g., four 8×8 transforms may be applied to a16×16 array of residual values) to produce a set of residual transformcoefficients. Transform coefficient generator 204 may be configured toperform any and all combinations of the transforms included in thefamily of discrete trigonometric transforms. As described above, inITU-T H.265, TBs are restricted to the following sizes 4×4, 8×8, 16×16,and 32×32. In one example, transform coefficient generator 204 may beconfigured to perform transformations according to arrays having sizesof 4×4, 8×8, 16×16, and 32×32. In one example, transform coefficientgenerator 204 may be further configured to perform transformationsaccording to arrays having other dimensions. In particular, in somecases, it may be useful to perform transformations on rectangular arraysof difference values. In one example, transform coefficient generator204 may be configured to perform transformations according to thefollowing sizes of arrays: 2×2, 2×4N, 4M×2, and/or 4M×4N. In oneexample, a 2-dimensional (2D) M×N inverse transform may be implementedas 1-dimensional (1D) M-point inverse transform followed by a 1D N-pointinverse transform. In one example, a 2D inverse transform may beimplemented as a 1D N-point vertical transform followed by a 1D N-pointhorizontal transform. In one example, a 2D inverse transform may beimplemented as a 1D N-point horizontal transform followed by a 1DN-point vertical transform. Transform coefficient generator 204 mayoutput transform coefficients to coefficient quantization unit 206.

Coefficient quantization unit 206 may be configured to performquantization of the transform coefficients. As described above, thedegree of quantization may be modified by adjusting a quantizationparameter. Coefficient quantization unit 206 may be further configuredto determine quantization parameters and output QP data (e.g., data usedto determine a quantization group size and/or delta QP values) that maybe used by a video decoder to reconstruct a quantization parameter toperform inverse quantization during video decoding. It should be notedthat in other examples, one or more additional or alternative parametersmay be used to determine a level of quantization (e.g., scalingfactors). The techniques described herein may be generally applicable todetermining a level of quantization for transform coefficientscorresponding to a component of video data based on a level ofquantization for transform coefficients corresponding another componentof video data.

Referring again to FIG. 4 , quantized transform coefficients are outputto inverse quantization/transform processing unit 208. Inversequantization/transform processing unit 208 may be configured to apply aninverse quantization and an inverse transformation to generatereconstructed residual data. As illustrated in FIG. 4 , at summer 210,reconstructed residual data may be added to a predictive video block. Inthis manner, an encoded video block may be reconstructed and theresulting reconstructed video block may be used to evaluate the encodingquality for a given prediction, transformation, and/or quantization.Video encoder 200 may be configured to perform multiple coding passes(e.g., perform encoding while varying one or more of a prediction,transformation parameters, and quantization parameters). Therate-distortion of a bitstream or other system parameters may beoptimized based on evaluation of reconstructed video blocks. Further,reconstructed video blocks may be stored and used as reference forpredicting subsequent blocks.

As described above, a video block may be coded using an intraprediction. Intra prediction processing unit 212 may be configured toselect an intra prediction mode for a video block to be coded. Intraprediction processing unit 212 may be configured to evaluate a frameand/or an area thereof and determine an intra prediction mode to use toencode a current block. As illustrated in FIG. 4 , intra predictionprocessing unit 212 outputs intra prediction data (e.g., syntaxelements) to entropy encoding unit 218 and transform coefficientgenerator 204. As described above, a transform performed on residualdata may be mode dependent. As described above, possible intraprediction modes may include planar prediction modes, DC predictionmodes, and angular prediction modes. Further, in some examples, aprediction for a chroma component may be inferred from an intraprediction for a luma prediction mode. Inter prediction processing unit214 may be configured to perform inter prediction coding for a currentvideo block. Inter prediction processing unit 214 may be configured toreceive source video blocks and calculate a motion vector for PUs of avideo block. A motion vector may indicate the displacement of a PU (orsimilar coding structure) of a video block within a current video framerelative to a predictive block within a reference frame. Interprediction coding may use one or more reference pictures. Further,motion prediction may be uni-predictive (use one motion vector) orbi-predictive (use two motion vectors). Inter prediction processing unit214 may be configured to select a predictive block by calculating apixel difference determined by, for example, sum of absolute difference(SAD), sum of square difference (SSD), or other difference metrics. Asdescribed above, a motion vector may be determined and specifiedaccording to motion vector prediction. Inter prediction processing unit214 may be configured to perform motion vector prediction, as describedabove. Inter prediction processing unit 214 may be configured togenerate a predictive block using the motion prediction data. Forexample, inter prediction processing unit 214 may locate a predictivevideo block within a frame buffer (not shown in FIG. 4 ). It should benoted that inter prediction processing unit 214 may further beconfigured to apply one or more interpolation filters to a reconstructedresidual block to calculate sub-integer pixel values for use in motionestimation. Inter prediction processing unit 214 may output motionprediction data for a calculated motion vector to entropy encoding unit218. As illustrated in FIG. 4 , inter prediction processing unit 214 mayreceive reconstructed video block via filter unit 216. Filter unit 216may be configured to perform deblocking and/or Sample Adaptive Offset(SAO) filtering. Deblocking refers to the process of smoothing theboundaries of reconstructed video blocks (e.g., make boundaries lessperceptible to a viewer). SAO filtering is a non-linear amplitudemapping that may be used to improve reconstruction by adding an offsetto reconstructed video data.

Referring again to FIG. 4 , entropy encoding unit 218 receives quantizedtransform coefficients and predictive syntax data (i.e., intraprediction data, motion prediction data, QP data, etc.). It should benoted that in some examples, coefficient quantization unit 206 mayperform a scan of a matrix including quantized transform coefficientsbefore the coefficients are output to entropy encoding unit 218. Inother examples, entropy encoding unit 218 may perform a scan. Entropyencoding unit 218 may be configured to perform entropy encodingaccording to one or more of the techniques described herein. Entropyencoding unit 218 may be configured to output a compliant bitstream,i.e., a bitstream that a video decoder can receive and reproduce videodata therefrom.

FIG. 5 is a block diagram illustrating an example of an entropy encoderthat may be configured to encode values of syntax elements according toone or more techniques of this disclosure. Entropy encoding unit 300 mayinclude a context adaptive entropy encoding unit, e.g., a CABAC encoder.As illustrated in FIG. 5 , entropy encoder 300 includes binarizationunit 302, binary arithmetic encoding unit 304, and context modeling unit310. Entropy encoding unit 300 may receive one or more syntax elementsvalues and output a compliant bitstream. As described above,binarization includes representing a value of syntax element in to a binstring. Binarization unit 302 may be configured to receive a value for asyntax element and produce a bin string according to one or morebinarization techniques. Binarization unit 302 may use, for example, anyone or combination of the following techniques to produce a bin string:fixed length coding, unary coding, truncated unary coding, truncatedRice coding, Golomb coding, exponential Golomb coding, and Golomb-Ricecoding.

As described above, binary arithmetic encoding codes a series of 0's and1's based on the principle of recursive interval subdivision. As furtherdescribed above, the estimated probability of b, being the LPS (or MPS)may be based on a context index. Binary arithmetic encoding unit 304 isconfigured to receive a bin string from binarization unit 302 and acontext index corresponding to a bin from context modeling unit 306, andperform binary arithmetic encoding on the bin string. That is, binaryarithmetic encoding unit 304 is configured to write bits to a bitstreamaccording to a renormalization process and further indicate an observedvalue of a bin such that a context model may be updated. The contextmodels may be defined according to a video coding standard, such as forexample, ITU-T H.265. The context models may be stored in a memory. Forexample, context modeling unit 306 may store a series of indexed tablesand/or utilize mapping functions to determine a context model for aparticular bin. It should be noted that the functions of binary codingare not limited to particular function blocks and the example of binaryarithmetic encoding unit 304 and context modeling unit 306 in theexample FIG. 5 should not be construed as limiting.

As described above, in ITU-T H.265, one or more 16-bit cabac_zero_wordsyntax elements having a value of 0x0000 are appended to a networkabstraction layer (NAL) unit if a bin-to-bit ratio becomes too high. Ithas been observed that when the process in ITU-T H.265 for codingcoefficient level values into a bitstream is modified, for example,according to the techniques described in JVET-K0072, the result is anincrease in the rate at which cabac_zero_word syntax elements areinserted into the bitstream. This increase is less than ideal.

In one example, according to the techniques herein, the bin-to-bit ratioat which one or more 16-bit cabac_zero_word syntax elements are appendedto NAL units may be increased. For example, in ITU-T H.265 the, currentconstraint is based on the following:

max bin rate=4/3bit rate+(raw image bit rate/32)

In one example, the constraint could be modified as follows:

max bin rate=3/2 bit rate+raw sample rate

Further, in one example, the constraint could be disabled, such that no16-bit cabac_zero_word syntax elements are inserted into the bitstream(or other bitstream padding occurs) regardless of the bin-to-bit ratio.In other examples, binarization of syntax elements, including the syntaxelements used to code coefficient level values, may be modified and suchmodifications may be improve coding efficiency when bitstream paddingoccurs based on a bin-to-bit ratio constraint. However, it should benoted that techniques for coding coefficient level values describedherein may be generally useful for video coding, regardless of anyconstraints based on a bin-to-bit ratio.

In one example, according to the techniques herein, a coefficient levelvalue may be indicated based on the example syntax illustrated in Table6.

TABLE 6 residual_coding( x0, y0, log2TrafoSizeX, log2TrafoSizeY, cIdx,stateTransTable ) { ... xS = ScanOrder[ log2TrafoSizeX − log2SbSize ][log2TrafoSizeY − log2SbSize ] [ scanIdx ][ lastSubBlock ][ 0 ] yS =ScanOrder[ log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY − log2SbSize ][ scanIdx ][ lastSubBlock ][ 1 ] xC = ( xS << log2SbSize ) + ScanOrder[log2SbSize ][ log2SbSize ][ scanIdx ][ lastScanPos ][ 0 ] yC = ( yS <<log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize ][ scanIdx ][lastScanPos ][ 1 ]  } while( ( xC != LastSignificantCoeffX ) | | ( yC != LastSignificantCoeffY ) )  state = 0  for( i = lastSubBlock; i >= 0; i−− ) {   xS = ScanOrder[ log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY −  log2SbSize ]        [ scanIdx ][ lastSubBlock ][ 0 ]   yS = ScanOrder[log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY −   log2SbSize ]        [scanIdx ][ lastSubBlock ][ 1 ]   inferSbDcSigCoeffFlag = 0   if( ( i <lastSubBlock ) && ( i > 0 ) ) {    coded_sub_block_flag[ xS ][ yS ]   inferSbDcSigCoeffFlag = 1   }   for( n = ( i = = lastSubBlock ) ?lastScanPos − 1 : numSbCoeff − 1;   n >= 0; n− − ) {    xC = ( xS <<log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][0 ]    yC = ( yS << log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize   ][ scanIdx ][ n ][ 1 ]    if( coded_sub_block_flag[ xS ][ yS ] && (n > 0 | |    !inferSbDcSigCoeffFlag ) )        {     sig_coeff_flag[ xC][ yC ]    }    if( sig_coeff_flag[ xC ][ yC ] ) {     rem_abs_gt1_flag[n ]     if( rem_abs_gt1_flag[ n ]) {      rem_abs_gt2_flag[ n ]      if(rem_abs_gt2_flag[ n ])       par_level_flag[ n ]     }     if(lastSigScanPosSb = = −1 )      lastSigScanPosSb = n    firstSigScanPosSb = n    }    absLevel[ xC ][ yC ] = sig_coeff_flag[xC ][ yC ] +    par_level_flag[ n ] +        rem_abs_gt1_flag[ n ] +rem_abs_gt2_flag[ n ]    absLevel1[ xC ][ yC ] = absLevel[ xC ][ yC ]   state = ( stateTransTable >> ( ( state << 2 ) + ( par_level_flag[   xC ][ yC ] << 1 ) ) ) & 3   }   for( n = numSbCoeff − 1; n >= 0; n− −) {    xC = ( xS << log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize   ][ scanIdx ][ n ][ 0 ]    yC = ( yS << log2SbSize ) + ScanOrder[log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][ 1 ]    if(rem_abs_gt2_flag[ xC ][ yC ] ) {     abs_remainder[ xC ][ yC ]    absLevel[ xC ][ yC ] = absLevel[ xC ][ yC ] + 2 *     abs_remainder[xC ][ yC ]    }   }   for( n = numSbCoeff − 1; n >= 0; n− − ) {    xC =( xS << log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx][ n ][ 0 ]    yC = ( yS << log2SbSize ) + ScanOrder[ log2SbSize ][log2SbSize    ][ scanIdx ][ n ][ 1 ]    if( sig_coeff_flag[ xC ][ yC ] ){     coeff_sign_flag[ xC ][ yC ]     TransCoeffLevel[ x0 ][ y0 ][ cIdx][ xC ][ yC ] =         absLevel[ xC ][ yC ] * ( 1 − 2 *coeff_sign_flag[         xC ][ yC ] )    }   }  } }

Table 7 provides a summary of possible level values of a coefficient ina sub-block having significant coefficients according to values ofsig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, andabs_remainder in Table 6.

TABLE 7 sig_coeff_flag rem_abs_gt1_flag rem_abs_gt2_flag par_level_flagabs_remainder Coefficient Level Value 0 Not Signaled Not Signaled NotSignaled Not Signaled 0 1 0 Not Signaled Not Signaled Not Signaled (1 −2 * coeff_sign_flag) 1 1 0 Not Signaled Not Signaled 2*(1 − 2 *coeff_sign_flag) 1 1 1 0 Signaled (3 + 2*abs_remainder) *(1 − 2 *coeff_sign_flag) 1 1 1 1 Signaled (4 + 2*abs_remainder) *(1 − 2 *coeff_sign_flag)

It should be noted that when the example syntax illustrated in Table 6is compared to the syntax illustrated in Table 4, the following may beobserved: the worst case number of context coded bins is unchanged; thenumber of contexts may remain unchanged; there may be fewer bins in thetypical case (i.e., value 1 uses fewer bins, 2 vs 3); it may be moreefficient because value 1 uses fewer bins (less extreme probabilities);and the syntax utilizes one fewer loop.

In one example, according to the techniques herein, a coefficient levelvalue may be indicated based on the example syntax illustrated in Table8.

TABLE 8 residual_coding( x0, y0, log2TrafoSizeX, log2TrafoSizeY, cIdx,stateTransTable ) { ... xS = ScanOrder[ log2TrafoSizeX − log2SbSize ][log2TrafoSizeY − log2SbSize ] [ scanIdx ][ lastSubBlock ][ 0 ] yS =ScanOrder[ log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY − log2SbSize ][ scanIdx ][ lastSubBlock ][ 1 ] xC = ( xS << log2SbSize ) + ScanOrder[log2SbSize ][ log2SbSize ][ scanIdx ][ lastScanPos ][ 0 ] yC = ( yS <<log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize ][ scanIdx ][lastScanPos ][ 1 ]  } while( ( xC != LastSignificantCoeffX ) | | ( yC != LastSignificantCoeffY ) )  state = 0  for( i = lastSubBlock; i >= 0; i−− ) {   xS = ScanOrder[ log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY −  log2SbSize ]        [ scanIdx ][ lastSubBlock ][ 0 ]   yS = ScanOrder[log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY −   log2SbSize ]        [scanIdx ][ lastSubBlock ][ 1 ]   inferSbDcSigCoeffFlag = 0   if( ( i <lastSubBlock ) && ( i > 0 ) ) {    coded_sub_block_flag[ xS ][ yS ]   inferSbDcSigCoeffFlag = 1   }   for( n = ( i = = lastSubBlock ) ?lastScanPos − 1 : numSbCoeff − 1;   n >= 0; n− − ) {    xC = ( xS <<log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][0 ]    yC = ( yS << log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize   ][ scanIdx ][ n ][ 1 ]    if( coded_sub_block_flag[ xS ][ yS ] && (n > 0 | |    !inferSbDcSigCoeffFlag ) ) {     sig_coeff_flag[ xC ][ yC ]   }    if( sig_coeff_flag[ xC ][ yC ] ) {     rem_abs_gt1_flag[ n ]    if( rem_abs_gt1_flag[ n ]) {      rem_abs_gt2_flag[ n ]      if(rem_abs_gt2_flag[ n ])       par_level_flag[ n ]       rem_abs_gt3_flag[n ]     }     if( lastSigScanPosSb = = −1 )      lastSigScanPosSb = n    firstSigScanPosSb = n    }    absLevel[ xC ][ yC ] = sig_coeff_flag[xC ][ yC ] +    par_level_flag[ n ] +        rem_abs_gt1_flag[ n ] +rem_abs_gt2_flag[ n ] +        2 * rem_abs_gt3_flag[ n ]    absLevel1[xC ][ yC ] = absLevel[ xC ][ yC ]    state = ( stateTransTable >> ( (state << 2 ) + ( par_level_flag[    xC ][ yC ] << 1 ) ) ) & 3   }   for(n = numSbCoeff − 1; n >= 0; n− − ) {    xC = ( xS << log2SbSize ) +ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][ 0 ]    yC = (yS << log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx][ n ][ 1 ]    if( rem_abs_gt3_flag[ xC ][ yC ] ) {     abs_remainder[xC ][ yC ]     absLevel[ xC ][ yC ] = absLevel[ xC ][ yC ] + 2 *    abs_remainder[ xC ][ yC ]    }   }   for( n = numSbCoeff − 1; n >=0; n− − ) {    xC = ( xS << log2SbSize ) + ScanOrder[ log2SbSize ][log2SbSize    ][ scanIdx ][ n ][ 0 ]    yC = ( yS << log2SbSize ) +ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][ 1 ]    if(sig_coeff_flag[ xC ][ yC ] ) {     coeff_sign_flag[ xC ][ yC ]    TransCoeffLevel[ x0 ][ y0 ][ cIdx ][ xC ][ yC ] =         absLevel[xC ][ yC ] * ( 1 − 2 * coeff_sign_flag[ xC         ][ yC ] )    }   }  }}

Table 9 provides a summary of possible level values of a coefficient ina sub-block having significant coefficients according to values ofsig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag,rem_abs_gt3_flag and abs_remainder in Table 8.

TABLE 9 sig_coeff_flag rem_abs_gt1_flag rem_abs_gt2_flag par_level_flagrem_abs_gt3_flag abs_remainder Coefficient Level Value 0 Not SignaledNot Signaled Not Signaled Not Signaled Not Signaled 0 1 0 Not SignaledNot Signaled Not Signaled Not Signaled (1 − 2 * coeff_sign_flag) 1 1 0Not Signaled Not Signaled Not Signaled 2*(1 − 2 * coeff_sign_flag) 1 1 10 0 Signaled (4 + 2*abs_remainder) *(1 − 2 * coeff_sign_flag) 1 1 1 0 1Signaled (6 + 2*abs_remainder) *(1 − 2 * coeff_sign_flag) 1 1 1 1 0Signaled (3 + 2*abs_remainder) *(1 − 2 * coeff_sign_flag) 1 1 1 1 1Signaled (5 + 2*abs_remainder) *(1 − 2 * coeff_sign_flag)

It should be noted that when the example syntax illustrated in Table 7is compared to the syntax illustrated in Table 4, the following may beobserved: there may be fewer bins in the typical case (i.e., value 1uses fewer bins); it may be more efficient because value 1 uses fewerbins (less extreme probabilities); and the syntax utilizes one fewerloop.

In one example, according to the techniques herein, a coefficient levelvalue may be indicated based on the example syntax illustrated in Table10.

TABLE 10 residual_coding( x0, y0, log2TrafoSizeX, log2TrafoSizeY, cIdx,stateTransTable ) { ... xS = ScanOrder[ log2TrafoSizeX − log2SbSize ][log2TrafoSizeY − log2SbSize ] [ scanIdx ][ lastSubBlock ][ 0 ] yS =ScanOrder[ log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY − log2SbSize ][ scanIdx ][ lastSubBlock ][ 1 ] xC = ( xS << log2SbSize ) + ScanOrder[log2SbSize ][ log2SbSize ][ scanIdx ][ lastScanPos ][ 0 ] yC = ( yS <<log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize ][ scanIdx ][lastScanPos ][ 1 ]  } while( ( xC != LastSignificantCoeffX ) | | ( yC != LastSignificantCoeffY ) )  state = 0  for( i = lastSubBlock; i >= 0; i−− ) {   xS = ScanOrder[ log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY −  log2SbSize ]       [ scanIdx ][ lastSubBlock ][ 0 ]   yS = ScanOrder[log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY −   log2SbSize ]       [scanIdx ][ lastSubBlock ][ 1 ]   inferSbDcSigCoeffFlag = 0   if( ( i <lastSubBlock ) && ( i > 0 ) ) {    coded_sub_block_flag[ xS ][ yS ]   inferSbDcSigCoeffFlag = 1   }   for( n = ( i = = lastSubBlock ) ?lastScanPos − 1 : numSbCoeff − 1;   n >= 0; n− − ) {    xC = ( xS <<log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][0 ]    yC = ( yS << log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize   ][ scanIdx ][ n ][ 1 ]    if( coded_sub_block_flag[ xS ][ yS ] )    par_level_flag[ n ]    if( coded_sub_block_flag[ xS ][ yS ] && ( n >0 | |    !inferSbDcSigCoeffFlag ||       par_level_flag[ n ] ) ) {    sig_coeff_flag[ xC ][ yC ]    }    if( sig_coeff_flag[ xC ][ yC ] )    rem_abs_gt1_flag[ n ]    absLevel[ xC ][ yC ] = 2 * sig_coeff_flag[xC ][ yC ] +    par_level_flag[ n ] + 2 *       rem_abs_gt1_flag[ n ]   if( absLevel [ xC ][ yC ] ) {     if( lastSigScanPosSb = = −1 )     lastSigScanPosSb = n     firstSigScanPosSb = n    }    absLevel1[xC ][ yC ] = absLevel[ xC ][ yC ]    state = ( stateTransTable >> ( (state << 2 ) + ( !par_level_flag[    xC ][ yC ] << 1 ) ) ) & 3   }  for( n = numSbCoeff − 1; n >= 0; n− − ) {    xC = ( xS << log2SbSize) + ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][ 0 ]    yC= ( yS << log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize    ][scanIdx ][ n ][ 1 ]    if( rem_abs_gt1_flag[ xC ][ yC ] ) {    abs_remainder[ xC ][ yC ]     absLevel[ xC ][ yC ] = absLevel[ xC ][yC ] + 2 *     abs_remainder[ xC ][ yC ]    }   }   for( n = numSbCoeff− 1; n >= 0; n− − ) {    xC = ( xS << log2SbSize ) + ScanOrder[log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][ 0 ]    yC = ( yS <<log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][1 ]    if( absLevel1[ xC ][ yC ] ) {     coeff_sign_flag[ xC ][ yC ]    TransCoeffLevel[ x0 ][ y0 ][ cIdx ][ xC ][ yC ] =        absLevel[xC ][ yC ] * ( 1 − 2 * coeff_sign_flag[ xC ][        yC ] )    }   }  }}

Table 11 provides a summary of possible level values of a coefficient ina sub-block having significant coefficients according to values ofsig_coeff_flag, par_level_flag, rem_abs_gt1_flag, and abs_remainder inTable 10.

TABLE 11 par_level_flag sig_coeff_flag rem_abs_gt1_flag abs_remainderCoefficient Level Value 0 0 Not Signaled Not Signaled 0 1 0 Not SignaledNot Signaled (1 − 2 * coeff_sign_flag) 0 1 0 Not Signaled 2*(1 − 2 *coeff_sign_flag) 0 1 1 Signaled (4 + 2*abs_remainder) *(1 − 2 *coeff_sign_flag) 1 1 0 Not Signaled 3*(1 − 2 * coeff_sign_flag) 1 1 1Signaled (5 + 2*abs_remainder) *(1 − 2 * coeff_sign_flag)

It should be noted that when the example syntax illustrated in Table 10is compared to the syntax illustrated in Table 4, the following may beobserved, the worst case number of context coded bins is reduced and thenumber of contexts may be reduced.

In one example, according to the techniques herein, a coefficient levelvalue may be indicated based on the example syntax illustrated in Table12.

TABLE 12 residual_coding( x0, y0, log2TrafoSizeX, log2TrafoSizeY, cIdx,stateTransTable ) { ... xS = ScanOrder[ log2TrafoSizeX − log2SbSize ][log2TrafoSizeY − log2SbSize ] [ scanIdx ][ lastSubBlock ][ 0 ] yS =ScanOrder[ log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY − log2SbSize ][ scanIdx ][ lastSubBlock ][ 1 ] xC = ( xS << log2SbSize ) + ScanOrder[log2SbSize ][ log2SbSize ][ scanIdx ][ lastScanPos ][ 0 ] yC = ( yS <<log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize ][ scanIdx ][lastScanPos ][ 1 ]  } while( ( xC != LastSignificantCoeffX ) | | ( yC != LastSignificantCoeffY ) )  state = 0  for( i = lastSubBlock; i >= 0; i−− ) {   xS = ScanOrder[ log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY −  log2SbSize ]       [ scanIdx ][ lastSubBlock ][ 0 ]   yS = ScanOrder[log2TrafoSizeX − log2SbSize ][ log2TrafoSizeY −   log2SbSize ]       [scanIdx ][ lastSubBlock ][ 1 ]   inferSbDcSigCoeffFlag = 0   if( ( i <lastSubBlock ) && ( i > 0 ) ) {    coded_sub_block_flag[ xS ][ yS ]   inferSbDcSigCoeffFlag = 1   }   for( n = ( i = = lastSubBlock ) ?lastScanPos − 1 : numSbCoeff − 1;   n >= 0; n− − ) {    xC = ( xS <<log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][0 ]    yC = ( yS << log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize   ][ scanIdx ][ n ][ 1 ]    if( coded_sub_block_flag[ xS ][ yS ] && (n > 0 | |    !inferSbDcSigCoeffFlag ) ) {     sig_coeff_flag[ xC ][ yC ]   }    if( sig_coeff_flag[ xC ][ yC ] ) {     rem_abs_gt1_flag[ n ]    if( rem_abs_gt1_flag[ n ]) {      par_level_flag[ n ]     rem_abs_gt2_flag[ n ] // Note: order of par_level_flag andrem_abs_gt2_flag could be switched     }     if( lastSigScanPosSb = = −1)      lastSigScanPosSb = n     firstSigScanPosSb = n    }    absLevel[xC ][ yC ] = sig_coeff_flag[ xC ][ yC ] −    par_level_flag[ n ] + 2 *      rem_abs_gt1_flag[ n ] + 2 * rem_abs_gt2_flag[ n ]    absLevel1[ xC][ yC ] = absLevel[ xC ][ yC ]    state = ( stateTransTable >> ( ( state<< 2 ) + ( par_level_flag[    xC ][ yC ] << 1 ) ) ) & 3   }   for( n =numSbCoeff − 1; n >= 0; n− − ) {    xC = ( xS << log2SbSize ) +ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][ 0 ]    yC = (yS << log2SbSize ) + ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx][ n ][ 1 ]    if( rem_abs_gt2_flag[ xC ][ yC ] ) {     abs_remainder[xC ][ yC ]     absLevel[ xC ][ yC ] = absLevel[ xC ][ yC ] + 2 *    abs_remainder[ xC ][ yC ]    }   }   for( n = numSbCoeff − 1; n >=0; n− − ) {    xC = ( xS << log2SbSize ) + ScanOrder[ log2SbSize ][log2SbSize    ][ scanIdx ][ n ][ 0 ]    yC = ( yS << log2SbSize ) +ScanOrder[ log2SbSize ][ log2SbSize    ][ scanIdx ][ n ][ 1 ]    if(sig_coeff_flag[ xC ][ yC ] ) {     coeff_sign_flag[ xC ][ yC ]    TransCoeffLevel[ x0 ][ y0 ][ cIdx ][ xC ][ yC ] =        absLevel[xC ][ yC ] * ( 1 − 2 * coeff_sign_flag[ xC ][        yC ] )    }   }  }}

Table 13 provides a summary of possible level values of a coefficient ina sub-block having significant coefficients according to values ofsig_coeff_flag, par_level_flag, rem_abs_gt1_flag, rem_abs_gt2_flag, andabs remainder in Table 12.

TABLE 13 sig_coeff_flag rem_abs_gt1_flag rem_abs_gt2_flag par_level_flagabs_remainder Coefficient Level Value 0 Not Signaled Not Signaled NotSignaled Not Signaled 0 1 0 Not Signaled Not Signaled Not Signaled (1 −2 * coeff_sign_flag) 1 1 0 1 Not Signaled 2*(1 − 2 * coeff_sign_flag) 11 0 0 Not Signaled 3*(1 − 2 * coeff_sign_flag) 1 1 1 1 Signaled (4 +2*abs_remainder) *(1 − 2 * coeff_sign_flag) 1 1 1 0 Signaled (5 +2*abs_remainder) *(1 − 2 * coeff_sign_flag)

It should be noted that when the example syntax illustrated in Table 12is compared to the syntax illustrated in Table 4, the following may beobserved, the worst case number of context coded bins is unchanged; thenumber of contexts may remain unchanged; there may be fewer bins in thetypical case (i.e., value 1 uses fewer bins (2 vs. 3)); it may be moreefficient because value 1 uses fewer bins (less extreme probabilities);and the syntax utilizes one fewer loop.

In this manner, video encoder represents an example of a deviceconfigured to determine whether a coefficient level value is equal toone, and in the case where the coefficient level value is equal to oneindicate that the coefficient level value is equal to one by signalingvalues for a first flag and a second flag, in the case where thecoefficient level value is greater than one determine whether thecoefficient level value is greater than or equal to three, in the casewhere the coefficient level value is not greater than or equal to three,indicate that the coefficient level value is equal to two by signalingvalues for the first flag, the second flag, and a third flag, in thecase where the coefficient level value is greater than or equal tothree, indicate a value of the coefficient level by signaling values forthe first flag, the second flag, the third flag, and a fourth flag.

FIG. 6 is a block diagram illustrating an example of a video decoderthat may be configured to decode video data according to one or moretechniques of this disclosure. In one example, video decoder 400 may beconfigured to reconstruct video data based on one or more of thetechniques described above. That is, video decoder 400 may operate in areciprocal manner to video encoder 200 described above. Video decoder400 may be configured to perform intra prediction decoding and interprediction decoding and, as such, may be referred to as a hybriddecoder. In the example illustrated in FIG. 6 video decoder 400 includesan entropy decoding unit 402, inverse quantization unit 404, inversetransformation processing unit 406, intra prediction processing unit408, inter prediction processing unit 410, summer 412, filter unit 414,and reference buffer 416. Video decoder 400 may be configured to decodevideo data in a manner consistent with a video encoding system, whichmay implement one or more aspects of a video coding standard. It shouldbe noted that although example video decoder 400 is illustrated ashaving distinct functional blocks, such an illustration is fordescriptive purposes and does not limit video decoder 400 and/orsub-components thereof to a particular hardware or softwarearchitecture. Functions of video decoder 400 may be realized using anycombination of hardware, firmware, and/or software implementations.

As illustrated in FIG. 6 , entropy decoding unit 402 receives an entropyencoded bitstream. Entropy decoding unit 402 may be configured to decodequantized syntax elements and quantized coefficients from the bitstreamaccording to a process reciprocal to an entropy encoding process.Entropy decoding unit 402 may be configured to perform entropy decodingaccording any of the entropy coding techniques described above. Entropydecoding unit 402 may parse an encoded bitstream in a manner consistentwith a video coding standard. Video decoder 400 may be configured toparse an encoded bitstream where the encoded bitstream is generatedbased on the techniques described above.

FIG. 7 is a block diagram illustrating an example entropy decoding unitthat may implement one or more of the techniques described in thisdisclosure. Entropy decoding unit 500 receives an entropy encodedbitstream and decodes syntax elements from the bitstream. As illustratedin FIG. 7 , entropy decoding unit 500 includes a binary arithmeticdecoding module 502, a context modeling unit 504 and a binarization unit506. Entropy decoding unit 500 may perform reciprocal functions toentropy encoding unit 300 described above with respect to FIG. 5 .

As shown in FIG. 7 , context modeling unit 508 and a binarization unit506 receive a request for a syntax element value. Context modeling unit504 determines a context index for the syntax element. Further, contextmodeling unit 504 updates a context index based on the determinationmade by binary arithmetic decoding module 502, for example, according tothe probability estimate techniques described above. Binary arithmeticdecoding module 502 receives n bits from the bitstream, i.e., thearithmetic code, and outputs a sequence of parsed bins based on thearithmetic code and the calculated sub-intervals. Binarization unit 506determines possible valid binarization values for a syntax element anduses a bin matching function to determine if a series parsed bin valuescorresponds to a valid value for the syntax element. When a series binvalues corresponds to a valid value for the syntax element, the value ofthe syntax element is output. That is, entropy decoding unit 500 isconfigured to determine the value of a bin based on the currentsub-interval and bits from the bitstream, based on techniques describedherein. In this manner, video decoder 400 represents an example of adevice configured to parse a first and second flag included in abitstream, determine that a coefficient level value is greater than onebased on the values of the parsed first and second flags, parse a thirdand fourth flag included in the bitstream, determine whether thecoefficient level value is an odd number greater than or equal to threeor an even number greater than or equal to four based on the values ofthe parsed third and fourth flag.

Referring again to FIG. 6 , inverse quantization unit 404 receivesquantized transform coefficients (i.e., level values) and quantizationparameter data from entropy decoding unit 402. Quantization parameterdata may include any and all combinations of delta QP values and/orquantization group size values and the like described above. Videodecoder 400 and/or inverse quantization unit 404 may be configured todetermine QP values used for inverse quantization based on valuessignaled by a video encoder and/or through video properties and/orcoding parameters. That is, inverse quantization unit 404 may operate ina reciprocal manner to coefficient quantization unit 206 describedabove. For example, inverse quantization unit 404 may be configured toinfer predetermined values), allowed quantization group sizes, and thelike, according to the techniques described above. Inverse quantizationunit 404 may be configured to apply an inverse quantization. Inversetransform processing unit 406 may be configured to perform an inversetransformation to generate reconstructed residual data. The techniquesrespectively performed by inverse quantization unit 404 and inversetransform processing unit 406 may be similar to techniques performed byinverse quantization/transform processing unit 208 described above.Inverse transform processing unit 406 may be configured to apply aninverse DCT, an inverse DST, an inverse integer transform, Non-SeparableSecondary Transform (NSST), or a conceptually similar inverse transformprocesses to the transform coefficients in order to produce residualblocks in the pixel domain. Further, as described above, whether aparticular transform (or type of particular transform) is performed maybe dependent on an intra prediction mode. As illustrated in FIG. 6 ,reconstructed residual data may be provided to summer 412. Summer 412may add reconstructed residual data to a predictive video block andgenerate reconstructed video data. A predictive video block may bedetermined according to a predictive video technique (i.e., intraprediction and inter frame prediction).

Intra prediction processing unit 408 may be configured to receive intraprediction syntax elements and retrieve a predictive video block fromreference buffer 416. Reference buffer 416 may include a memory deviceconfigured to store one or more frames of video data. Intra predictionsyntax elements may identify an intra prediction mode, such as the intraprediction modes described above. In one example, intra predictionprocessing unit 308 may reconstruct a video block using according to oneor more of the intra prediction coding techniques described herein.Inter prediction processing unit 410 may receive inter prediction syntaxelements and generate motion vectors to identify a prediction block inone or more reference frames stored in reference buffer 416. Interprediction processing unit 410 may produce motion compensated blocks,possibly performing interpolation based on interpolation filters.Identifiers for interpolation filters to be used for motion estimationwith sub-pixel precision may be included in the syntax elements. Interprediction processing unit 410 may use interpolation filters tocalculate interpolated values for sub-integer pixels of a referenceblock. Filter unit 414 may be configured to perform filtering onreconstructed video data. For example, filter unit 414 may be configuredto perform deblocking and/or SAO filtering, as described above withrespect to filter unit 216. Further, it should be noted that in someexamples, filter unit 414 may be configured to perform proprietarydiscretionary filter (e.g., visual enhancements). As illustrated in FIG.6 , a reconstructed video block may be output by video decoder 400.

In one or more examples, the functions described may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored on or transmitted over as oneor more instructions or code on a computer-readable medium and executedby a hardware-based processing unit. Computer-readable media may includecomputer-readable storage media, which corresponds to a tangible mediumsuch as data storage media, or communication media including any mediumthat facilitates transfer of a computer program from one place toanother, e.g., according to a communication protocol. In this manner,computer-readable media generally may correspond to (1) tangiblecomputer-readable storage media which is non-transitory or (2) acommunication medium such as a signal or carrier wave. Data storagemedia may be any available media that can be accessed by one or morecomputers or one or more processors to retrieve instructions, codeand/or data structures for implementation of the techniques described inthis disclosure. A computer program product may include acomputer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium. It should be understood, however, thatcomputer-readable storage media and data storage media do not includeconnections, carrier waves, signals, or other transitory media, but areinstead directed to non-transitory, tangible storage media. Disk anddisc, as used herein, includes compact disc (CD), laser disc, opticaldisc, digital versatile disc (DVD), floppy disk and Blu-ray disc wheredisks usually reproduce data magnetically, while discs reproduce dataoptically with lasers. Combinations of the above should also be includedwithin the scope of computer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablelogic arrays (FPGAs), or other equivalent integrated or discrete logiccircuitry. Accordingly, the term “processor,” as used herein may referto any of the foregoing structure or any other structure suitable forimplementation of the techniques described herein. In addition, in someaspects, the functionality described herein may be provided withindedicated hardware and/or software modules configured for encoding anddecoding, or incorporated in a combined codec. Also, the techniquescould be fully implemented in one or more circuits or logic elements.

The techniques of this disclosure may be implemented in a wide varietyof devices or apparatuses, including a wireless handset, an integratedcircuit (IC) or a set of ICs (e.g., a chip set). Various components,modules, or units are described in this disclosure to emphasizefunctional aspects of devices configured to perform the disclosedtechniques, but do not necessarily require realization by differenthardware units. Rather, as described above, various units may becombined in a codec hardware unit or provided by a collection ofinteroperative hardware units, including one or more processors asdescribed above, in conjunction with suitable software and/or firmware.

Moreover, each functional block or various features of the base stationdevice and the terminal device used in each of the aforementionedembodiments may be implemented or executed by a circuitry, which istypically an integrated circuit or a plurality of integrated circuits.The circuitry designed to execute the functions described in the presentspecification may comprise a general-purpose processor, a digital signalprocessor (DSP), an application specific or general applicationintegrated circuit (ASIC), a field programmable gate array (FPGA), orother programmable logic devices, discrete gates or transistor logic, ora discrete hardware component, or a combination thereof. Thegeneral-purpose processor may be a microprocessor, or alternatively, theprocessor may be a conventional processor, a controller, amicrocontroller or a state machine. The general-purpose processor oreach circuit described above may be configured by a digital circuit ormay be configured by an analogue circuit. Further, when a technology ofmaking into an integrated circuit superseding integrated circuits at thepresent time appears due to advancement of a semiconductor technology,the integrated circuit by this technology is also able to be used.

Various examples have been described. These and other examples arewithin the scope of the following claims.

1. A decoder for decoding encoded data, the decoder comprising: adecoding circuitry that decodes: (i) a significant coefficient flagspecifying whether a transform coefficient level is non-zero, (ii) afirst absolute level greater flag specifying whether a parity level flagis present for a scanning position, in a case that a value of thesignificant coefficient flag is equal to one, (iii) the parity levelflag specifying a parity of the transform coefficient level at thescanning position, in a case that a value of the first absolute levelgreater flag is equal to one, (iv) a second absolute level greater flagspecifying whether an absolute remainder syntax element is present forthe scanning position, in the case that a value of the first absolutelevel great flag is equal to one, and (v) the absolute remainder syntaxelement specifying a remaining absolute value of the transformcoefficient level, in a case that a value of the second absolute levelgreater flag is equal to one, and that derives a first significant scanposition for a subblock variable equal to the scanning position, whereinthe decoding circuitry derives a first absolute level value for thetransform coefficient level by adding a second absolute level value to aproduct of two times a value of the absolute remainder syntax element,wherein the second absolute level value is a sum of (a) the value of thesignificant coefficient flag, (b) a value of the parity level flag, (c)the value of the first absolute level greater flag, and (d) a product oftwo times the value of the second absolute value level greater flag, andthe first significant scan position for the subblock variable is derivedafter the second absolute level greater flag is decoded and before thesecond absolute level value is derived.
 2. A method of decoding encodeddata, the method including: decoding a significant coefficient flagspecifying whether a transform coefficient level is non-zero, decoding afirst absolute level greater flag specifying whether a parity level flagis present for a scanning position, in a case that a value of thesignificant coefficient flag is equal to one; decoding the parity levelflag specifying a parity of the transform coefficient level at thescanning position, in a case that a value of the first absolute levelgreater flag is equal to one; decoding a second absolute level greaterflag specifying whether an absolute remainder syntax element is presentfor the scanning position, in the case that the value of the firstabsolute level greater flag is equal to one; deriving a firstsignificant scan position for a subblock variable equal to the scanningposition; decoding the absolute remainder syntax element specifying aremaining absolute value of the transform coefficient level, in a casethat a value of the second absolute level greater flag is equal to one;deriving a first absolute level value for the transform coefficientlevel by adding a second absolute level value to a product of two timesa value of the absolute remainder syntax element, wherein the secondabsolute level value is a sum of (a) the value of the significantcoefficient flag, (b) a value of the parity level flag, (c) the value ofthe first absolute level greater flag, and (d) a product of two timesthe value of the second absolute value level greater flag, wherein thefirst significant scan position for the subblock variable is derivedafter the second absolute level greater flag is decoded and before thesecond absolute level value is derived.
 3. An encoder for encoding imagedata, the encoder comprising: an encoding circuitry that encodes: (i) asignificant coefficient flag specifying whether a transform coefficientlevel is non-zero, (ii) a first absolute level greater flag specifyingwhether a parity level flag is present for a scanning position, in acase that a value of the significant coefficient flag is equal to one,(iii) the parity level flag specifying a parity of the transformcoefficient level at the scanning position, in a case that a value ofthe first absolute level greater flag is equal to one, (iv) a secondabsolute level greater flag specifying whether an absolute remaindersyntax element is present for the scanning position, in the case thatthe value of the first absolute level great flag is equal to one, and(v) the absolute remainder syntax element specifying a remainingabsolute value of the transform coefficient level, in a case that avalue of the second absolute level greater flag is equal to one, andthat derives a first significant scan position for a subblock variableequal to the scanning position, wherein the encoding circuitry derives afirst absolute level value for the transform coefficient level by addinga second absolute level value to a product of two times a value of theabsolute remainder syntax element, wherein the second absolute levelvalue is a sum of (a) the value of the significant coefficient flag, (b)a value of the parity level flag, (c) the value of the first absolutelevel greater flag, and (d) a product of two times the value of thesecond absolute value level greater flag, and the first significant scanposition for the subblock variable is derived after the second absolutelevel greater flag is encoded and before the second absolute level valueis derived.